const KoaRouter = require('@koa/router')
const staffController = require('../controller/staff.controller')
const { verifyAuth } = require('../middleware/login.middleware')
const { verfiyWoker } = require('../middleware/staff.middleware')

const staffRouter = new KoaRouter({ prefix: '/staff' })

staffRouter.post('/create', verifyAuth, verfiyWoker, staffController.create)

staffRouter.get('/list', verifyAuth, staffController.findWokers)

staffRouter.delete('/delete/:id', verifyAuth, staffController.delete)

staffRouter.patch('/update', verifyAuth, staffController.update)

module.exports = staffRouter